/*    */ package com.cr.framework.config;
/*    */ 
/*    */ import com.cr.common.config.RuoYiConfig;
/*    */ import com.cr.framework.interceptor.RepeatSubmitInterceptor;
/*    */ import org.springframework.beans.factory.annotation.Autowired;
/*    */ import org.springframework.beans.factory.annotation.Value;
/*    */ import org.springframework.context.annotation.Configuration;
/*    */ import org.springframework.web.servlet.HandlerInterceptor;
/*    */ import org.springframework.web.servlet.config.annotation.*;
/*    */
/*    */
/*    */

/*    */
/*    */ @Configuration
/*    */ public class ResourcesConfig implements WebMvcConfigurer {
/*    */   @Value("${shiro.user.indexUrl}")
/*    */   private String indexUrl;
/*    */   
/*    */   @Autowired
/*    */   private RepeatSubmitInterceptor repeatSubmitInterceptor;
/*    */   
/*    */   public void addViewControllers(ViewControllerRegistry registry) {
/* 37 */     registry.addViewController("/").setViewName("forward:" + this.indexUrl);
/*    */   }
/*    */   
/*    */   public void addResourceHandlers(ResourceHandlerRegistry registry) {
/* 44 */     registry.addResourceHandler(new String[] { "/profile/**" }).addResourceLocations(new String[] { "file:" + RuoYiConfig.getProfile() + "/" });
/* 47 */     registry.addResourceHandler(new String[] { "/swagger-ui/**" }).addResourceLocations(new String[] { "classpath:/META-INF/resources/webjars/springfox-swagger-ui/" });
/*    */   }
/*    */   
/*    */   public void addInterceptors(InterceptorRegistry registry) {
/* 56 */     registry.addInterceptor((HandlerInterceptor)this.repeatSubmitInterceptor).addPathPatterns(new String[] { "/**" });
/*    */   }
/*    */ }


/* Location:              D:\tmp\creditorRights-admin\BOOT-INF\lib\creditorRights-framework-4.7.0.jar!\com\cr\framework\config\ResourcesConfig.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */